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