UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DT3oO+ubdiN9YEH9nGg7/E26svoo/yb59NQmGDckYhE='
WHERE
key_id = '92bb7a742c67bf4f3e3b60ad63d0ecd0e89039574b8ab2f802ca7fd74bcf4f30'
AND (
token = 'DT3oO+ubdiN9YEH9nGg7/E26svoo/yb59NQmGDckYhE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)