UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MNUV6Adq3djEdEMWJy1WPo5R5nYKfGQ8ptq9KSBi4Is='
WHERE
key_id = 'eeb27e6624eb803cf4d0d5f678ac739ad990bae6262d6f2d35b10ff40e82e582'
AND (
token = 'MNUV6Adq3djEdEMWJy1WPo5R5nYKfGQ8ptq9KSBi4Is='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)