UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '43VGnp2cj8tSLKjLe2z/za9MbK8ZI5HfAHa7bvyEdfc='
WHERE
key_id = '7ad405021170552507bc382d04aeac54bf9bc0f978c0cd4a5718fbb32dbe6328'
AND (
token = '43VGnp2cj8tSLKjLe2z/za9MbK8ZI5HfAHa7bvyEdfc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)