UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IzCwRoxUzTZXeq3gaAkMf0vQoLcF//438IEeT2FDWH0='
WHERE
key_id = '0ce5ac1cd6506fedee35ba72c429f353599ce51adf1928e5e4fa0557ed5c743c'
AND (
token = 'IzCwRoxUzTZXeq3gaAkMf0vQoLcF//438IEeT2FDWH0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)