UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/oIxG4S/A3+wFJnSEFvyPKWOQR5E55oBYs+ADjKSv1Y='
WHERE
key_id = '7926cbe81150acea7cdbfb7c8a7e264113ebf1180952c607beb828e760fb46a5'
AND (
token = '/oIxG4S/A3+wFJnSEFvyPKWOQR5E55oBYs+ADjKSv1Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)