UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4cmY6BjlK1gNBLa2y66nD1Gd08X+P/zCDkodZp4sqWQ='
WHERE
key_id = '907b75f7102f91593bf560c26a0e18f98d96cd4467b29a40160247a10eaa074c'
AND (
token = '4cmY6BjlK1gNBLa2y66nD1Gd08X+P/zCDkodZp4sqWQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)