UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4u1iYCw4YD9F69ZUawwDrmJ44Xqs7l/lyk1vrOCbnWE='
WHERE
key_id = '9f6fb498d42c084f491a48ede40843d08fc5be1c3e7a63f3f62299946cc397aa'
AND (
token = '4u1iYCw4YD9F69ZUawwDrmJ44Xqs7l/lyk1vrOCbnWE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)