UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2zuxPp8a8znkYtw0C6OYcOrk9T/KKKIxRYSuOa1dsqA=' 
WHERE 
  key_id = 'ac5aa5add32dcac83cfdaeee6c123421a428634d48516e42b3e0aa4bef6e89b4' 
  AND (
    token = '2zuxPp8a8znkYtw0C6OYcOrk9T/KKKIxRYSuOa1dsqA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027