UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QLl2CMS7vmwLZmfUx7VGTReTnbcWQ6aUxxfYxpQe+fI='
WHERE
key_id = 'd91922141945aa6d9b3350643c0344f5646676f92bb715498e228cef0c6b2992'
AND (
token = 'QLl2CMS7vmwLZmfUx7VGTReTnbcWQ6aUxxfYxpQe+fI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)