UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rV9wXgnEhgvrbU9CqCd1+MCBuWd63eUnUqNxt5x4+Lg='
WHERE
key_id = '2533481b3fb22e254a2a1a1fe6f4ab00b3c24095cabc8da9b70ddbd606b1ef2d'
AND (
token = 'rV9wXgnEhgvrbU9CqCd1+MCBuWd63eUnUqNxt5x4+Lg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)