UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pxMuToHgmrNZFtxvEIieXzqXs4KaCgJrifRj56jHpgI='
WHERE
key_id = '8207192ca47a28ffc484e44026022c47589ad1b6782fc20e9481115ff4301cf9'
AND (
token = 'pxMuToHgmrNZFtxvEIieXzqXs4KaCgJrifRj56jHpgI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)