UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vqW8+c01o/JFMRcxvWQ0ilCa4jESkFu0/GgiW176MEQ=' 
WHERE 
  key_id = '60afc6373970b1682e75d130fb83b087f999660c73b8e39697a3f775152444fe' 
  AND (
    token = 'vqW8+c01o/JFMRcxvWQ0ilCa4jESkFu0/GgiW176MEQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017