UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/b56xOkR8nXuM/MfJHb/xCi/tQFndfgVlfgoz//om4k='
WHERE
key_id = 'b7bbb94d911bb955fa0bf2a6d2167972de6a6f3ffddceb2e9885ae19b27e1e6c'
AND (
token = '/b56xOkR8nXuM/MfJHb/xCi/tQFndfgVlfgoz//om4k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)