UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/EoTcYETSZPob2xWB3YU6162QO/Ybdu/E8cNX72WRy0=' 
WHERE 
  key_id = '4e5ee5f0da37f4d332943782214c56e72b3c4c8ffa5364c31ab2a15a0d91237e' 
  AND (
    token = '/EoTcYETSZPob2xWB3YU6162QO/Ybdu/E8cNX72WRy0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036