UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qe4F57fpKjCqQcJp+OHUKsb7w1L+/krkQKjbSvddIlI='
WHERE
key_id = '96d9998db34a821a86d6b43a70149a75328f838c14bf978c65e7aca063bf7088'
AND (
token = 'qe4F57fpKjCqQcJp+OHUKsb7w1L+/krkQKjbSvddIlI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)