UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K+uvSyMvolOujXg+7lTbzQpS53uftwXeg8sSvkHPFiI='
WHERE
key_id = '484dbcb3444d63f3cf677ca05880fcf0613187728809d3d3e82126890f7c7c67'
AND (
token = 'K+uvSyMvolOujXg+7lTbzQpS53uftwXeg8sSvkHPFiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)