UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bk8pL6bQDtXwPCqRp9bk9RG9G+vJP0JZyXv1vmVF9ZA=' 
WHERE 
  key_id = '9a6a64e8e7f8b9bc284d52d2f1fab4fe33e9ed9b2dab238a506ad6842fd461fe' 
  AND (
    token = 'bk8pL6bQDtXwPCqRp9bk9RG9G+vJP0JZyXv1vmVF9ZA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029