UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GokMTlh4VcHWnrDQdBqOZo6P7XQmn7dvsX/6bF6I1iQ='
WHERE
key_id = '4760db2f8cea9ca14023beb2bad95996a828d4c82de91fc0f899c91bd1021b1c'
AND (
token = 'GokMTlh4VcHWnrDQdBqOZo6P7XQmn7dvsX/6bF6I1iQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)