UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9PX3Z6nNS018Kt1LNCiqA41K39/UJSTchujL+w2eS2I='
WHERE
key_id = 'fc9185ba13d2d42b74d3501080ed171102fec94bb4e512ded9ce55fb79536a76'
AND (
token = '9PX3Z6nNS018Kt1LNCiqA41K39/UJSTchujL+w2eS2I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)