UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+PufibzDjrZP8+Pq5c0NK43SG3jZrNTduz/Kyzmns7E=' 
WHERE 
  key_id = 'a25ddc0a186c21d2adf3a3b60caa44169aabae8aaf23d70ab6505b7035c03011' 
  AND (
    token = '+PufibzDjrZP8+Pq5c0NK43SG3jZrNTduz/Kyzmns7E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040