UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DHYxFezZ6yu7/i4sxY5S2RiPdHVsu9/Q3iKmItRZcFQ='
WHERE
key_id = '2c8d3de9387639a51f4876c9344e87ce9a9f559e47c810396ad0e86285b16b42'
AND (
token = 'DHYxFezZ6yu7/i4sxY5S2RiPdHVsu9/Q3iKmItRZcFQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)