UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oVdFft6aL8omW357ZM7gBTsqqsBbXCDNeiLupalbPjc='
WHERE
key_id = 'bb093b5bb9e22a0c62e02d57830a111bbb75b62d8b10aae7fb7d97a8dd765e98'
AND (
token = 'oVdFft6aL8omW357ZM7gBTsqqsBbXCDNeiLupalbPjc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)