UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PThInBZcZrY99qjvAijFNbaV/E1EnUiDaAk/zf3ciOQ='
WHERE
key_id = '0926411a8c44366d2934bc00cddcebd16b533e1ffb7bc1b629e649c3e8ff058d'
AND (
token = 'PThInBZcZrY99qjvAijFNbaV/E1EnUiDaAk/zf3ciOQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)