UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LXGclHsOQYzwTrY4Ext/dJ7CzpVEjDi9Vq6oKuh27dg=' 
WHERE 
  key_id = '4ce4141744b6428da06bb8431a69341408ecccb4775adc0c8834724fc756d949' 
  AND (
    token = 'LXGclHsOQYzwTrY4Ext/dJ7CzpVEjDi9Vq6oKuh27dg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020