UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fIWU068DWIfA5b8RU5ghnyN8Bu/GBXJmwKi+9LNaTUc=' 
WHERE 
  key_id = 'fcb9c7fa7b9b6ddc5cbb459ab6ac6796ceb6b59ecc200698a7f080274d675f83' 
  AND (
    token = 'fIWU068DWIfA5b8RU5ghnyN8Bu/GBXJmwKi+9LNaTUc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032