UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zNf7eMb7/rZvbtmpU8wVJuIQ63BbN5y6s6eLfWHI4hc='
WHERE
key_id = '5fd066e6c7bbce2df9258a13460f497cf66e2fc43ccfd740d223f0caf8b30480'
AND (
token = 'zNf7eMb7/rZvbtmpU8wVJuIQ63BbN5y6s6eLfWHI4hc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)