UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Ilzx9CK2qs14zQnt/mN31hEzGen9bvH4gRatX/g34E='
WHERE
key_id = '4410c419e9895ff15fb45ab3eeaa59dc076e41746b41373dfef178e903b1fa2e'
AND (
token = '/Ilzx9CK2qs14zQnt/mN31hEzGen9bvH4gRatX/g34E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)