UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZiHCODn8Uy2sYkVNwnWnpWSq/h015CppEI3ihwwQqmg='
WHERE
key_id = '291e8520313bae144c996371fa154225c599f449a97a426610862e7002af8b5c'
AND (
token = 'ZiHCODn8Uy2sYkVNwnWnpWSq/h015CppEI3ihwwQqmg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)