UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'q1vOKZuff/GNUTrAEqy+YATXQxizeAaVGj03lSw7MKY='
WHERE
key_id = '83e7490d0147d367688ca22599cb59425b3235ed61d9296342bd9f004cdc4319'
AND (
token = 'q1vOKZuff/GNUTrAEqy+YATXQxizeAaVGj03lSw7MKY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)