UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0HM7D/ylYykBFOiRb1MNJ1SS/eR3JJcIbXoVAXK1DjY=' 
WHERE 
  key_id = '45b0cd4fa151895ed1c047ad8487f1f1f51d8f63a7b8ba97b80b320cc40f4149' 
  AND (
    token = '0HM7D/ylYykBFOiRb1MNJ1SS/eR3JJcIbXoVAXK1DjY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021