UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9u+cKX0dAPYXODgxryQ3S6HcO4/Rgg1HoS8ZOhFZO/g=' 
WHERE 
  key_id = '73271c0c073f8860ba203a32e75d9eacf588d7526036d9cf86e555c7c1b3e68d' 
  AND (
    token = '9u+cKX0dAPYXODgxryQ3S6HcO4/Rgg1HoS8ZOhFZO/g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035