UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Pase9OC8SKL8xh8DQm6e4/R2s/xAvn4ESzmKTMk7aUw=' 
WHERE 
  key_id = 'cb43f21e76c4d261e845ecd4cd12bf1cf1d688cfd8e1d812e0be176aa6d7f99d' 
  AND (
    token = 'Pase9OC8SKL8xh8DQm6e4/R2s/xAvn4ESzmKTMk7aUw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030