UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+gFwbE638u1e4S/D8oNEinjwHj6b91ObBf2Gje5FK8c='
WHERE
key_id = '643bf19ab5e6bae3fd1a7b2b555ae3401cdfa3f05e1a59a6d3c83f9b3096c195'
AND (
token = '+gFwbE638u1e4S/D8oNEinjwHj6b91ObBf2Gje5FK8c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)