UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0o0YbP9RP6au2aOtWwB73PqlkPWiWBH19fiDyn8deGs='
WHERE
key_id = '1ab6f8d6ffe3d49e9725bb7b78c3e24a867479e2ae95e1728a158dc4af981148'
AND (
token = '0o0YbP9RP6au2aOtWwB73PqlkPWiWBH19fiDyn8deGs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)