UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'o8MqVUWr3k5F9cfMVLycSd0y+UnPNIm8Tl3UyDgDaQQ=' 
WHERE 
  key_id = '7ce69b550b95d24744ee8f30ea5bba1553d6e4e112837aa010b8e3f801c72b3b' 
  AND (
    token = 'o8MqVUWr3k5F9cfMVLycSd0y+UnPNIm8Tl3UyDgDaQQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020