UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C73TN0K9ME25DwojE18jead8pPH+Y0rc26/xq7KyFhg='
WHERE
key_id = 'a0220ea235453d51de4e500aeda34efe1060a4edbcb4057762cc2ac28ae42d0d'
AND (
token = 'C73TN0K9ME25DwojE18jead8pPH+Y0rc26/xq7KyFhg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)