UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eEHSErP+lkl9WGMah4JMM/0jXGk2RusVeR2CLUmcxd8=' 
WHERE 
  key_id = 'eb1975474a54d01700bf75fc84cc25c3f1421f725a7e59cae92b95d47163e0a1' 
  AND (
    token = 'eEHSErP+lkl9WGMah4JMM/0jXGk2RusVeR2CLUmcxd8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044