UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QQvH4ddi5QzfCThsW5C88vAsXwx8v8uza3qdgsmrano='
WHERE
key_id = '83e636ca2263af8a505801c14874f5d00e88b65009bfed9f30ee21fb77157580'
AND (
token = 'QQvH4ddi5QzfCThsW5C88vAsXwx8v8uza3qdgsmrano='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)