UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l/d/ZqjwDSyxuQzYsOeLs6wmxsPskwniEaEq24BbHQA='
WHERE
key_id = '10a42058f93bfd5444e991a13f1e8dbd85b95df0f5020f0f23794ed6799186fa'
AND (
token = 'l/d/ZqjwDSyxuQzYsOeLs6wmxsPskwniEaEq24BbHQA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)