UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mrFUIPS9X1mQDHixhaT2LdWpmD6TNIhuExXX/LqExmA='
WHERE
key_id = '296219c05b9d9cab1a78fcc5113925838ee159f9a975483052f782e630169943'
AND (
token = 'mrFUIPS9X1mQDHixhaT2LdWpmD6TNIhuExXX/LqExmA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)