UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'CQrPuch5pWck2dZK+d53ObrBoWygfM1TmiggIOMuo9s='
WHERE
key_id = '92f158a68ecd58c61933e170646fe8982cf417e86cbde2b0f09f96570fb4a5c4'
AND (
token = 'CQrPuch5pWck2dZK+d53ObrBoWygfM1TmiggIOMuo9s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)