UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/u63/JmHXd/jtWAzwv1kCBVIiB5Cw5I/dY2SndzbzOQ=' 
WHERE 
  key_id = '6ff9f0890a754b886186a40ed7d1fcc5244f292120b3b4eaec1cc54ab6903494' 
  AND (
    token = '/u63/JmHXd/jtWAzwv1kCBVIiB5Cw5I/dY2SndzbzOQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015