UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's+L3en1CdygxTQA4fizadne6Xu75Hh0FRJbeQTTB2eg=' 
WHERE 
  key_id = 'db465aec619efcd86393d7a7427c85d36ef9c22cd2d4bc14810e459650a62c17' 
  AND (
    token = 's+L3en1CdygxTQA4fizadne6Xu75Hh0FRJbeQTTB2eg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035