UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't1/yFhPrfo055Rp0/dI92GVSuee5htvSCqlmEljiQoU=' 
WHERE 
  key_id = '75723d85b5d8e6777d9e479123818a567e5cee2cb8acdbbf1c1b939a9a2b95b1' 
  AND (
    token = 't1/yFhPrfo055Rp0/dI92GVSuee5htvSCqlmEljiQoU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028