UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jkeUS94XQ7G8KAlEMQtRmAdLZf5joga+LkmYZpUvhDM=' 
WHERE 
  key_id = 'ea13064ef8d7879c8496314c029eebba0498b9fcc0b53b2efe6e6e0bb3b116a6' 
  AND (
    token = 'jkeUS94XQ7G8KAlEMQtRmAdLZf5joga+LkmYZpUvhDM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050