UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Cz328w1t9xLr/sO+sTBBsK2FO936mcEKOeAM10QngY='
WHERE
key_id = '306c00e46659bf987862ac3552c52ed9f6ab81e13779d8c369e88880d6b699d1'
AND (
token = '+Cz328w1t9xLr/sO+sTBBsK2FO936mcEKOeAM10QngY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)