UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZZGueQdI16XXhuBhJflYOWXbnKv/5vsj2Jrv3gbXokY=' 
WHERE 
  key_id = '8472c38abf69b050b86d1269e34e570f0822b4171340c01bf2c6d75c90e8affa' 
  AND (
    token = 'ZZGueQdI16XXhuBhJflYOWXbnKv/5vsj2Jrv3gbXokY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017