UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Momulqygu1qeMR3b39xoSvbBSj2dm+rTeqkykl4GJhM='
WHERE
key_id = 'cb5b40a9f5d66ad7a414ba553ec8d9ea90997652886500980ebe6251113e1556'
AND (
token = 'Momulqygu1qeMR3b39xoSvbBSj2dm+rTeqkykl4GJhM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)