UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Pjz3r1S/M/LBDmWE+/FLDd6HDe6JWBGf/sKMHpd4cNs='
WHERE
key_id = '85b079ce35981b6148a6617ba4312e94bef0f65d5f8e059322c2aa71d123df57'
AND (
token = 'Pjz3r1S/M/LBDmWE+/FLDd6HDe6JWBGf/sKMHpd4cNs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)