UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4Ek3LjjLcqf26KcWJtDZQXYIHTG7LWOr2Qqhk1YY1tE='
WHERE
key_id = '08a0854a6b960dab4c38becfaa02e3d7adc1b8a089a54de5e63f759ffa8c85d4'
AND (
token = '4Ek3LjjLcqf26KcWJtDZQXYIHTG7LWOr2Qqhk1YY1tE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)