UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5/c+wHgUIK3fjBcWn7p9NxLoLjBcaFc2rPCQz4xiEeg=' 
WHERE 
  key_id = '80a0d70adacf14effecef82bbf94e73eb308c4027e4f565660826a57146ed38d' 
  AND (
    token = '5/c+wHgUIK3fjBcWn7p9NxLoLjBcaFc2rPCQz4xiEeg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024