UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm6Sob76irff6nivoKtxFMM+Evrgq/rftaLAGIlZJ5EI='
WHERE
key_id = '0cbdb6f796d30d066a06e92465d8f2dd9d4ba2bfb64580170ebdbe757fd8b706'
AND (
token = 'm6Sob76irff6nivoKtxFMM+Evrgq/rftaLAGIlZJ5EI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)