UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7ooXL+063iIRQJjpHDpCEl42GwK30AGdp6uqgPN/dgE='
WHERE
key_id = 'a5de5be60e73020a7eac5b15f2371eb9a7fec772cfc1f2cbe236ba99c96cd110'
AND (
token = '7ooXL+063iIRQJjpHDpCEl42GwK30AGdp6uqgPN/dgE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)