UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MT/08e4CVoorB/s6LnF7bpSowS1zZJsv8X3HevrR0kU='
WHERE
key_id = '33ea7f348f0cf7a82f6e7923f1312f67a076017a6788f305f89019aac56a0f93'
AND (
token = 'MT/08e4CVoorB/s6LnF7bpSowS1zZJsv8X3HevrR0kU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)