UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ME2FNGLfGzxHxjt2vHlff1eq5gXgqEs6VFiaOWBV0/0=' 
WHERE 
  key_id = '414448533f57c1c2c3aedd28d33843e241960981559cc38db2330b6238a80980' 
  AND (
    token = 'ME2FNGLfGzxHxjt2vHlff1eq5gXgqEs6VFiaOWBV0/0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020