UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+UvFtMRGzeL5SiM10M1OrM2UtwFJMNHrEpzGlbpXPdk='
WHERE
key_id = 'cbfccc1dba4077f25c96dcd8ac30e9926517949b148166f73287e5596775e78d'
AND (
token = '+UvFtMRGzeL5SiM10M1OrM2UtwFJMNHrEpzGlbpXPdk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)