UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tiMYSiqzV71bklaPV6pJmd2Uie9GaBhE/vzQ4pwkDvA='
WHERE
key_id = 'eacacf2f596e1678083334a86882cb80a794656fdced960adf528438063ee46e'
AND (
token = 'tiMYSiqzV71bklaPV6pJmd2Uie9GaBhE/vzQ4pwkDvA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)