UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3zVvCDq7JHSdr/8rEbIylbKDl1GsMAf4ms3XgrLJK68=' 
WHERE 
  key_id = 'f88164f75c2c221f53194e4a73301c54d672e9d8e834db933e15c94fd7672526' 
  AND (
    token = '3zVvCDq7JHSdr/8rEbIylbKDl1GsMAf4ms3XgrLJK68=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045