UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XNX03lhHpe/wAN4vNW6puc7hJk+pdQb1l7JBFYQiduE='
WHERE
key_id = '759cdd1d4c26f1ee476b07f765fe63d897c205370b950be69ee06fa0ddf65762'
AND (
token = 'XNX03lhHpe/wAN4vNW6puc7hJk+pdQb1l7JBFYQiduE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)